/**
* ServerPacket Class is designed to store the most recently recieved information packet form the server
* Group: Y1
* @author Mason Kwiat
*/


//package network;
package lightspeed.Network;

import java.io.Serializable;
import java.util.ArrayList;

public class ServerPacket implements Serializable
{
	/**
	*	An array of strings
	*/
	public String[] messages;
	/**
	 *	An array of scores
	 */
	public short[] scores;
	/**
	*	A double array of integers which hold the x&y positions of the ship
	*/
	public short[][] shipPositions; // xposition, yposition, rotation angle, team
	/**
	*	A double array of integers which hold the x&y positions of the bullet
	*/
	public short[][] bulletPositions; // xposition, yposition
	/**
	*	Constructor: creates an instance of ServerPacket
	*	It instantiates the messages and shipPositions array based upon how many clients are connected to play
	*	@param numClients integer that hold the number of clients who are connected to play the game
	*/
	
	public short redFlagX, redFlagY;
	public short blueFlagX, blueFlagY;
	
	public short gameOver;
	
	public static int maxBulletsPerClient;
	
	public ServerPacket(int numClients)
	{
		messages = new String[numClients];
		scores = new short[2];
		maxBulletsPerClient = 105;
		
		gameOver = 0;
		
		shipPositions = new short[numClients][4];
		for(int i = 0; i < shipPositions.length; ++i)
		{
			shipPositions[i][0] = (short)-5;
		}
		
		bulletPositions = new short[numClients*maxBulletsPerClient][3];
	}
}
